package com.hifar.sso.model;

import java.io.Serializable;

/**
 * SSO认证请求模型
 * 
 * @author system
 * @since 1.0.0
 */
public class SSORequest implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 用户名
     */
    private String username;
    
    /**
     * 密码
     */
    private String password;
    
    /**
     * 客户端ID
     */
    private String clientId;
    
    /**
     * 客户端密钥
     */
    private String clientSecret;
    
    /**
     * 授权码
     */
    private String code;
    
    /**
     * 重定向URI
     */
    private String redirectUri;
    
    /**
     * 响应类型
     */
    private String responseType;
    
    /**
     * 作用域
     */
    private String scope;
    
    /**
     * 状态参数
     */
    private String state;
    
    /**
     * 刷新令牌
     */
    private String refreshToken;
    
    /**
     * 授权类型
     */
    private String grantType;
    
    public SSORequest() {
    }
    
    public SSORequest(String username, String password) {
        this.username = username;
        this.password = password;
    }
    
    // Getters and Setters
    public String getUsername() {
        return username;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }
    
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    public String getClientId() {
        return clientId;
    }
    
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    
    public String getClientSecret() {
        return clientSecret;
    }
    
    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }
    
    public String getCode() {
        return code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }
    
    public String getRedirectUri() {
        return redirectUri;
    }
    
    public void setRedirectUri(String redirectUri) {
        this.redirectUri = redirectUri;
    }
    
    public String getResponseType() {
        return responseType;
    }
    
    public void setResponseType(String responseType) {
        this.responseType = responseType;
    }
    
    public String getScope() {
        return scope;
    }
    
    public void setScope(String scope) {
        this.scope = scope;
    }
    
    public String getState() {
        return state;
    }
    
    public void setState(String state) {
        this.state = state;
    }
    
    public String getRefreshToken() {
        return refreshToken;
    }
    
    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }
    
    public String getGrantType() {
        return grantType;
    }
    
    public void setGrantType(String grantType) {
        this.grantType = grantType;
    }
    
    @Override
    public String toString() {
        return "SSORequest{" +
                "username='" + username + '\'' +
                ", password='[PROTECTED]'" +
                ", clientId='" + clientId + '\'' +
                ", clientSecret='[PROTECTED]'" +
                ", code='" + code + '\'' +
                ", redirectUri='" + redirectUri + '\'' +
                ", responseType='" + responseType + '\'' +
                ", scope='" + scope + '\'' +
                ", state='" + state + '\'' +
                ", refreshToken='[PROTECTED]'" +
                ", grantType='" + grantType + '\'' +
                '}';
    }
}
